package com.itheima.io.reader.demo02;

import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.IOException;
import java.io.Reader;

public class ReaderDemo02 {

    public static void main(String[] args) throws IOException {

        Reader reader = new FileReader("itheima-io-reader\\a.txt");

//        int i = reader.read();
//        System.out.println(i);
//        System.out.println((char)i);
//
//        i = reader.read();
//        System.out.println((char)i);
//
//        i = reader.read();
//        System.out.println((char)i);
//
//        i = reader.read();
//        System.out.println(i);

        int in = -1;
        while ((in = reader.read()) != -1){
            System.out.print((char)in);
        }

        reader.close();

    }

}
